<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="../node_modules/jquery/dist/jquery.js"></script>
</head>
<body>
<div></div>
<script>
     $(function () {
         //设置css
         //1、逐个设置
         $("div").css("width","100px");
         $("div").css("height","100px");
         $("div").css("background","red");

         //2、链式编程
         $("div").css("width","100px").css("height","100px").css("background","blue");

         //3、对象
         $("div").css({
             "width":"100px",
             "height":"100px",
             "background":"yellow",
         });
        //4、直接创建对象
         var obj = {
             "width":"100px",
             "height":"100px",
             "background":"aqua",
         };
         $("div").css(obj);

         //获取
         console.log($("div").css("width"));
     });
</script>
</body>
</html>